package com.xyy.saas.payment.adpater.pingan;

import lombok.Getter;

import java.util.Arrays;
import java.util.List;

@Getter
public enum PinganMethod {
    KFEJZB6248("KFEJZB6248", "AutonymOpenCustAcctId", "实名开户"),
    KFEJZB6244("KFEJZB6244", "RegisterBehaviorRecordInfo", "签署开户协议"),
    KFEJZB6240("KFEJZB6240", "BindSmallAmountWithCheckCorp", "绑定提现卡"),
    KFEJZB6061("KFEJZB6061", "SmallAmountTransferQuery", "小额鉴权转账结果查询"),
    KFEJZB6241("KFEJZB6241", "CheckAmountWithCorp", "回填随机金额和短信指令号"),
    KFEJZB6065("KFEJZB6065", "UnbindRelateAcct", "会员解绑提现账户"),
    KFEJZB6098("KFEJZB6098", "MemberBindQuery", "会员绑定信息查询"),
    PAY("NOT_REQUIRED", "order/pay", "支付"),
    PAY_QUERY("NOT_REQUIRED", "order/querySingleOrder", "支付状态查询"),
    REFUND("NOT_REQUIRED", "order/applyRefund", "退款"),
    REFUND_QUERY("NOT_REQUIRED", "order/querySingleRefund", "退款状态查询"),
    KFEJZB6292("KFEJZB6292", "QueryCrowdAcountMsg", "订单(冻结)余额查询"),
    KFEJZB6267("KFEJZB6267", "ThirdFreezeRecharge", "冻结充值"),
    KFEJZB6268("KFEJZB6268", "ThirdFreezeRechargeCancel", "冻结充值撤销（退款）"),
    KFEJZB6273("KFEJZB6273", "TraFinalStatusQuery", "冻结充值/冻结充值撤销/补贴/补贴撤销/分账/分账撤销状态查询"),
    KFEJZB6034("KFEJZB6034", "MemberTransaction", "会员间交易"),
    KFEJZB6164("KFEJZB6164", "MemberTransactionRefund", "会员间交易退款"),
    KFEJZB6110("KFEJZB6110", "SingleTransactionStatusQuery", "会员间交易/提现/充值状态查询"),
    KFEJZB6271("KFEJZB6271", "SubAccountQuest", "分账"),
    KFEJZB6272("KFEJZB6272", "SubAccountCancel", "分账撤销"),
    KFEJZB6139("KFEJZB6139", "RegisterBillSupportWithdraw", "登记挂账"),
    KFEJZB6140("KFEJZB6140", "RevRegisterBillSupportWithdraw", "登记挂账撤销"),
    KFEJZB6108("KFEJZB6108", "BankClearQuery", "查询银行清算结果"),
    KFEJZB6010("KFEJZB6010", "CustAcctIdBalanceQuery", "查询银行子账户余额"),
    KFEJZB6033("KFEJZB6033", "MembershipWithdrawCash", "提现"),
    KFEJZB6048("KFEJZB6048", "BankWithdrawCashBackQuery", "查询提现退汇信息"),
    KFEJZB6103("KFEJZB6103", "ReconciliationDocumentQuery", "查询对账文件信息"),
    KFEJZB6142("KFEJZB6142", "DetailVerifiedCodeQuery", "查询交易凭证信息"),
    KFEJZB6293("KFEJZB6293", "MntMbrBindSameRealCustNameAcct", "实名开同名账户关联关系维护"),
    LOAN_PRE_APPLY("LOAN_PRE_APPLY", "kyb-apply/openapi/apply/payFiancePreApply", "贷款申请"),
//    LOAN_APPLY_STATUS_NOTIFY("LOAN_APPLY_STATUS_NOTIFY", "", "授信状态通知"),
//    LOAN_WITHDRAW_NOTIFY("LOAN_WITHDRAW_NOTIFY", "", "融资提款状态通知"),
//    LOAN_REFUND_NOTIFY("LOAN_REFUND_NOTIFY", "", "融资提前还款通知"),
    LOAN_APPLY_STATUS("LOAN_APPLY_STATUS", "openapi/bdqsservice/queryApplicationStatus", "融资状态查询"),
//    LOAN_REFUND_PLAN("LOAN_REFUND_PLAN", "", "还款计划回盘文件下载"),
    LOAN_CUSTOMER_DATA("LOAN_CUSTOMER_DATA", "openapi/bdqsservice/sendCustomerData", "客户数据上送"),
    LOAN_BANK_TOKEN("LOAN_BANK_TOKEN", "kyb-apply/openapi/apply/creditFinanceBankToken", "创建银行bankToken"),

    KFEJZB6147("KFEJZB6147", "PlatformAccountSupply", "平台补账"),
    KFEJZB6216("KFEJZB6216", "OnWayTopThirdPaySplit", "在途充值"),
    KFEJZB6217("KFEJZB6217", "RevokeOnWayTopThirdPaySplit", "在途充值撤销"),
    CREDIT_PAY("NOT_REQUIRED", "order/wallet", "信用支付"),
    KFEJZB6296("KFEJZB6296", "MemberInformationChange", "会员信息修改"),
    KFEJZB6007("KFEJZB6007", "MembershipTrancheFreeze", "会员资金冻结-不验证"),
    KFEJZB6274("KFEJZB6274", "OrderBalanceQuery", "订单余额查询（查询6007接口冻结的订单余额）"),
    KFEJZB6037("KFEJZB6037", "QueryCustAcctId", "根据在平台的会员ID查询银行的子账户号"),
    ;

    /**
     * 需要监控预警的方法列表
     */
    public static final List<String> ALARM_METHOD = Arrays.asList(
            //KFEJZB6267.getMethodCode(), KFEJZB6268.getMethodCode(),
            //KFEJZB6034.getMethodCode(), KFEJZB6164.getMethodCode(),
            //KFEJZB6139.getMethodCode(), KFEJZB6140.getMethodCode(),
            //KFEJZB6216.getMethodCode(), KFEJZB6217.getMethodCode(),
            //KFEJZB6033.getMethodCode()
    );

    private String methodCode;
    private String methodName;
    private String desc;

    // Headers非必填请求
    public static final String NOT_REQUIRED = "NOT_REQUIRED";

    PinganMethod(String methodCode, String methodName, String desc) {
        this.methodCode = methodCode;
        this.methodName = methodName;
        this.desc = desc;
    }
}
